﻿namespace EyeOpen.OopByTdd
{
	using System;
	using EyeOpen.OopByTdd.Animals;

	internal class AnimalSample : Sample
	{
		public override void Main()
		{
			CreateAnimalAndSpeak(new Woodpecker());
			CreateAnimalAndSpeak(new Cat());

			Console.ReadLine();
		}

		private static void CreateAnimalAndSpeak(Animal animal)
		{
			var type = animal.GetType();

			var animalType = type.Name;

			animal.Speak();
			Console.WriteLine("{0}: {1}, Legs: {2}", animalType, animal.Speak(), animal.Legs);
		}
	}
}